﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Andrewl.XnaHelpers.Audio;
using Andrewl.XnaHelpers.Input;
using Andrewl.XnaHelpers.Storage;
using Microsoft.Xna.Framework.Storage;
using Andrewl.XnaHelpers.Generics;

namespace Andrewl.XnaHelpers
{
    public static class XnaHelpers
    {
        #region Variable Declarations 
       
        public static string name;

        public static Game game;

        public static GraphicsDeviceManager graphicsManager;

        public static GraphicsDevice graphicsDevice;

        public static ContentManager content;

        public static ResourceContentManager resxContent;

        public static SpriteBatch spriteBatch;

        public static GameTime gameTime;

        public static InputManager inputManager;

        public static XactAudio xactSoundManagers;

        public static StandardAudio standardSoundManagers;

#if XBOX
        public static XboxStorage storage;  
#endif
#if WINDOWS
        public static WindowsStorage storage;
#endif
        #endregion

        #region Core Accessors

        public static Game Game
        { get { return game; } }

        public static GraphicsDeviceManager GraphicsDeviceManager
        { get { return graphicsManager; } }

        public static GraphicsDevice GraphicsDevice
        { get { return graphicsDevice; } }

        public static ContentManager Content
        { get { return content; } }

        public static ResourceContentManager ResourceContent
        { get { return resxContent; } }

        public static SpriteBatch SpriteBatch
        { get { return spriteBatch; } }

        public static GameTime GameTime
        { get { return gameTime; } }

        public static InputManager Input
        { get { return inputManager; } }

#if XBOX
        public static XboxStorage Storage
        { get { return storage; } }

        public static string StoragePath
        { get { return storage.Path; } }
#endif
#if WINDOWS
        public static WindowsStorage Storage
        { get { return storage; } }

        public static string StoragePath
        { get { return Storage.Path; } }
#endif

        #endregion

        #region Embedded Content

        public static Texture2D whitePixel;

        public static SpriteFont debugFont;

        #endregion

        #region Embedded Content Accessors

        public static Texture2D WhitePixel
        { get { return whitePixel; } }

        public static SpriteFont DebugFont
        { get { return debugFont; } }

        #endregion

        #region Manager Functions

        #region Audio

        public static XactAudio XactAudio
        { get { return xactSoundManagers; } }
        
        public static StandardAudio StandardAudio
        { get { return standardSoundManagers; } }

        #endregion
        #region Storage

#if XBOX
        public static void GetStorageDevice()
        {
            storage.GetStorageDevice();
        }
#endif
#if WINDOWS
        public static void SetStorageLocation(string Path)
        {
            storage.SetStoragePath(Path);
        }
#endif

        #endregion

        #endregion

    }

}
